/*
 * @Description:
 * @Author: Junhuang
 * @Date: 2022-07-14 11:05:58
 * @LastEditTime: 2022-07-14 11:06:24
 * @LastEditors: Junhuang
 * @Reference:
 */
'use strict';
module.exports = {
  parseMsg(action, payload = {}, metadata = {}) {
    const meta = {
      timestamp: Date.now(),
      ...metadata,
    };

    return {
      meta,
      data: {
        action,
        payload,
      },
    };
  },
};
